package util
{
	public class Webmod
	{
		private var script:String;
		private var html:String;
		private var style:String;
		public function Webmod()
		{
			this.script="<script type='text/javascript'>function toggle(id){var e = document.getElementById(id);if(e.style.display == 'block')e.style.display = 'none';else{e.style.display = 'block';}}</script>";
			this.style="<style>span.toctext{font-size:30px;}</style>" ;
				}
		public function gethtml(tag:String,id:String):String
		{
			//change the id
			this.html='<font size=5><a href="Javascript: void(0)" onclick="toggle('+"'"+id+"'"+');">展开</a></font><'+tag+' id="'+id+'" '+"style='display:none;'";
			return html;
		}
		public function getscript():String
		{
			return script;
		}
		public function getnamehtml(tag:String,id:String,name:String):String
		{
			this.html='<font size=5><a id="a'+id+'" href="Javascript: void(0)" onclick="toggle('+"'"+id+"'"+');">'+name+'</a></font><'+tag+' id="'+id+'" '+"style='display:none;'";
			return html;
		}
		public function getstyle():String
		{
			return style;
		}
		public function gettop():String
		{
			return '<div class="go-top" style="right: 10px; opacity: 1; "><a href="atoc" id=""><span>返回目录</span></a></div>';
		}
	}
}